package com.irdstudio.efp.esb.api.bean.wsd.credit.req.fristCredit;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import com.irdstudio.basic.framework.core.annotation.DicType;
import com.irdstudio.efp.esb.api.common.GroupeInterface.wsd;
import com.irdstudio.efp.esb.common.constant.nls.NlsCertTpEnum;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 需求编号:2019D0910
 * 问题编号:
 * 开发人员: caoxin
 * 创建日期:2019/8/12
 * 功能描述:
 * 修改日期:2019/8/12
 * 修改描述:
 */
public class NlsWsdFirstReqBean implements Serializable {

    // 请求幂等ID
    @NotNull(groups= {wsd.class})
    @NotEmpty(groups= {wsd.class})
    @Length(max = 256,groups= {wsd.class})
    private String  RqsIdmptntID;
    @JSONField(name = "RqsIdmptntID")
    public String  getRqsIdmptntID() { return RqsIdmptntID; }
    @JSONField(name = "RqsIdmptntID")
    public void setRqsIdmptntID( String RqsIdmptntID) { this.RqsIdmptntID = RqsIdmptntID; }
    // 适配授信申请编号
    @NotNull(groups= {wsd.class})
    @NotEmpty(groups= {wsd.class})
    @Length(max = 64,groups= {wsd.class})
    private String  AdptCrdtAplNo;
    @JSONField(name = "AdptCrdtAplNo")
    public String  getAdptCrdtAplNo() { return AdptCrdtAplNo; }
    @JSONField(name = "AdptCrdtAplNo")
    public void setAdptCrdtAplNo( String AdptCrdtAplNo) { this.AdptCrdtAplNo = AdptCrdtAplNo; }
    // 证件类型
    @NotNull(groups= {wsd.class})
    @NotEmpty(groups= {wsd.class})
    @Length(max = 32,groups= {wsd.class})
    @DicType(dicType = NlsCertTpEnum.class, method = "getValue",groups= {wsd.class})
    private String  CertTp;
    @JSONField(name = "CertTp")
    public String  getCertTp() { return CertTp; }
    @JSONField(name = "CertTp")
    public void setCertTp( String CertTp) { this.CertTp = CertTp; }
    // 证件名称
    @NotNull(groups= {wsd.class})
    @NotEmpty(groups= {wsd.class})
    @Length(max = 200,groups= {wsd.class})
    private String  CertNm;
    @JSONField(name = "CertNm")
    public String  getCertNm() { return CertNm; }
    @JSONField(name = "CertNm")
    public void setCertNm( String CertNm) { this.CertNm = CertNm; }
    // 证件号码
    @NotNull(groups= {wsd.class})
    @NotEmpty(groups= {wsd.class})
    @Length(max = 32,groups= {wsd.class})
    private String  CertNo;
    @JSONField(name = "CertNo")
    public String  getCertNo() { return CertNo; }
    @JSONField(name = "CertNo")
    public void setCertNo( String CertNo) { this.CertNo = CertNo; }
    // 网商联合贷贷款产品类型值
    @Length(max = 64,groups= {wsd.class})
    private String  NtwrkMrchLoanPdVal;
    @JSONField(name = "NtwrkMrchLoanPdVal")
    public String  getNtwrkMrchLoanPdVal() { return NtwrkMrchLoanPdVal; }
    @JSONField(name = "NtwrkMrchLoanPdVal")
    public void setNtwrkMrchLoanPdVal( String NtwrkMrchLoanPdVal) { this.NtwrkMrchLoanPdVal = NtwrkMrchLoanPdVal; }
    // 产品代码
    @NotNull(groups= {wsd.class})
    @NotEmpty(groups= {wsd.class})
    @Length(max = 32,groups= {wsd.class})
    private String  ProdCd;
    @JSONField(name = "ProdCd")
    public String  getProdCd() { return ProdCd; }
    @JSONField(name = "ProdCd")
    public void setProdCd( String ProdCd) { this.ProdCd = ProdCd; }
    // 产品名称
    @NotNull(groups= {wsd.class})
    @NotEmpty(groups= {wsd.class})
    @Length(max = 64,groups= {wsd.class})
    private String  PdNm;
    @JSONField(name = "PdNm")
    public String  getPdNm() { return PdNm; }
    @JSONField(name = "PdNm")
    public void setPdNm( String PdNm) { this.PdNm = PdNm; }
    // 初审复审标志
    @NotNull(groups= {wsd.class})
    @NotEmpty(groups= {wsd.class})
    @Length(max = 11,groups= {wsd.class})
    private String  TrlRvwFlg;
    @JSONField(name = "TrlRvwFlg")
    public String  getTrlRvwFlg() { return TrlRvwFlg; }
    @JSONField(name = "TrlRvwFlg")
    public void setTrlRvwFlg( String TrlRvwFlg) { this.TrlRvwFlg = TrlRvwFlg; }
    // 扩展字段
    private String  ExnFld;
    @JSONField(name = "ExnFld")
    public String  getExnFld() { return ExnFld; }
    @JSONField(name = "ExnFld")
    public void setExnFld( String ExnFld) { this.ExnFld = ExnFld; }

    private NlsWsdFirstExtInfo nlsWsdFirstExtInfo;

    public NlsWsdFirstExtInfo getNlsWsdFirstExtInfo() {
        nlsWsdFirstExtInfo = JSON.parseObject(ExnFld, NlsWsdFirstExtInfo.class);
        return nlsWsdFirstExtInfo;
    }
}